package cn.stylefeng.guns.modular.transport.mapper;

import cn.stylefeng.guns.modular.transport.entity.MapDisptch;
import cn.stylefeng.guns.modular.transport.entity.MapDisptchMongo;
import cn.stylefeng.guns.modular.transport.entity.MapDisptchNew;
import cn.stylefeng.guns.modular.transport.model.params.MapDisptchParam;
import cn.stylefeng.guns.modular.transport.model.result.MapDisptchResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wp
 * @since 2025-04-14
 */
public interface MapDisptchMapper extends BaseMapper<MapDisptch> {

    /**
     * 获取列表
     *
     * @author wp
     * @Date 2025-04-14
     */
    List<MapDisptchResult> customList(@Param("paramCondition") MapDisptchParam paramCondition);

    /**
     * 获取map列表
     *
     * @author wp
     * @Date 2025-04-14
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") MapDisptchParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author wp
     * @Date 2025-04-14
     */
    Page<MapDisptchResult> customPageList(@Param("page") Page page, @Param("paramCondition") MapDisptchParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author wp
     * @Date 2025-04-14
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") MapDisptchParam paramCondition);


    void insertMapDisptch(MapDisptch mapDisptch);

    void updateMapDisptchById(MapDisptch mapDisptch);

    List<MapDisptchNew> getMapDisptch(@Param("dispatchNumber") String dispatchNumber, @Param("operateId") String operateId);

    List<MapDisptchMongo> getMapDisptchMongo(@Param("dispatchNumber") String dispatchNumber, @Param("operateId") String operateId);

    List<MapDisptchMongo> getMapDisptchMongoOnWay(@Param("operateId") String operateId);
}
